/**
 *T_SYS_DEPARTMENT - 部门信息表 model object
 *author:yhb
 */
package com.towker.frame.model.sys;

public class Department
{
	// 部门ID
	private Long id = 0L;
	// 部门名称
	private String name = "";
	// 部门描述
	private String description = "";
	// 上级部门
	private Long parentid = 0L;
	//员工数量。（非数据库字段）
	private Long userCnt = 0L;
	//职位数量。（非数据库字段）(父子想关)
	private Long positionCnt=0L;
	//职位数量。（非数据库字段）(父子不想关)
	private Long positionCntUnrelated=0L;
	//分配给了用户。
	private boolean assignToUser=false;
	//是否展开
	private boolean open=false;
	public Long getPositionCnt()
	{
		return positionCnt;
	}

	public void setPositionCnt(Long positionCnt)
	{
		this.positionCnt = positionCnt;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId()
	{
		return this.id;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getName()
	{
		return this.name;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	public String getDescription()
	{
		return this.description;
	}

	public void setParentid(Long parentid)
	{
		this.parentid = parentid;
	}

	public Long getParentid()
	{
		return this.parentid;
	}

	public Long getUserCnt()
	{
		return userCnt;
	}

	public void setUserCnt(Long userCnt)
	{
		this.userCnt = userCnt;
	}

	/**
	 * 重写父类获得字符串方法。
	 * */
	@Override
	public String toString()
	{
		return"{id:"+id+",pid:"+parentid+",name:'"+name+"',checked:"+assignToUser+",open:"+open+"}";
	}

	public Long getPositionCntUnrelated()
	{
		return positionCntUnrelated;
	}

	public void setPositionCntUnrelated(Long positionCntUnrelated)
	{
		this.positionCntUnrelated = positionCntUnrelated;
	}

	public boolean isAssignToUser()
	{
		return assignToUser;
	}

	public void setAssignToUser(boolean assignToUser)
	{
		this.assignToUser = assignToUser;
	}

	public boolean isOpen()
	{
		return open;
	}

	public void setOpen(boolean open)
	{
		this.open = open;
	}
}
